using System.Collections.Generic;
using System.Linq;
using UnityEngine;

[CreateAssetMenu(fileName = "Effect13-给自己设置目标的攻击力", menuName = "Skill/Effect/Effect13-给自己设置目标的攻击力", order = 13)]
public class Effect13 : EffectBase
{
    public override void Apply(Pair pair, GameEvent e, List<Chess> targets)
    {
        if(targets == null || targets.Count == 0)
        {
            pair.Chess.ChessDetail.Attack = 1;
            return;
        }
        foreach (var target in targets)
        {
            pair.Chess.ChessDetail.Attack = target.ChessDetail.Attack;
        }
    }
}